home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / PUTIMAGE.ZIP;1 / PUT.DOC < prev    next >
Encoding:
Text File  |  1994-06-23  |  4.1 KB  |  116 lines

  1. Putimagefx ver 0.9 (beta)
  2.  
  3. I say its a beta version because it does'nt include yet its
  4. "fx" counterparts, the code which makes the "fx" possible,
  5. thus allowing you to not only just PUT the clipping on the
  6. screen but to fade it in using different technices, such as
  7. sparkle,swipe,melt, and use palette routines to fade the
  8. clipping in from black or out to black or whatever color.
  9. The 1.0 version of Putimagefx will probably be released
  10. around august of '94, so look for it then.
  11.  
  12. Overview:
  13. Putimagefx is the fastest clipping function I know of to
  14. date. It coppies a bitmap from memory in a specific format,
  15. to any segment in conventional memory. The purpose of putting
  16. it at any segment you choose is for maybe a hidden screen, a
  17. temporary page or something of that nature to aid in the
  18. process of flicker-free animation on IBM PC's. About a year
  19. ago, I started needing faster clipping functions than the
  20. ones supplied by Borlands BGI functions, so I went on a quest
  21. to find some. Oh, I found many, many that sounded REALLY
  22. good, Fastgraphs bitmap functions are an example. They sound
  23. good, and they ARE very user friendly and versitle, but the
  24. are horribly slow!! The overhead in making these functions
  25. work for so many different video modes boggs down the
  26. tightest assembley optimized code. So I figured since most
  27. decent applications these days are wrote in the MCGA mode 13h
  28. 320 x 200 x 256, then I would write a specific function for a
  29. specific video mode: mode 13h. I could go on and on about the
  30. +'s of mode 13h, but I wont, so don't worry. Maybe I'll write
  31. a book one day on it.
  32.  
  33. Features:
  34. - Automatic transparacy of color 0
  35. - Automatic clipping off the right and bottom of the screen
  36. - FAST!!
  37. - Fully optimized in assembly as an .obj file.
  38.  
  39. Transparancy:
  40. It automatically assumes color 0 is the transparancy color
  41. and only copies pixels other than that. 'nuff said.
  42.  
  43. Clipping:
  44. So far clipping is only available for the right and bottom of
  45. the screen, this makes it ALOT faster than providing the left
  46. and top. Trust me, its a lot easier to code and it makes it
  47. alot faster, but don't worry, its commin. Also if you try to
  48. display the image beyond 319 or 199 it knows this and just
  49. returns without wasting any time doing something for nothing.
  50.  
  51. Speed:
  52. 2500 putimagefx's per second. This is displaying a 15 x 15
  53. image (225 bytes) on a 386dx-40 w/ a non-accelerated video
  54. card. Thats more than 500k a second. This is comparable with
  55. Borlands BGI putimage which is about 5k per second.
  56.  
  57. Assembly:
  58. 20 hours of hand coded assembly work and compiled as a
  59. linkable .obj file.
  60.  
  61.  
  62. Calling:
  63. Its called in my Turbo C++ 2.0 by:
  64. putimagefx(int x,int y,unsigned char * buffer,int
  65. destination)
  66. very easy.
  67. x & y are screen coordinates where the upper left corner of
  68. the clipping will be placed.
  69.  
  70. buffer is of course the buffer in which the clipping is
  71. stored.
  72.  
  73. destination is the segment in memory where the image is to be
  74. placed. An easy and quick way to display it is to put 0xa000
  75. as destination to copy the image directly to the VGA page
  76. frame.
  77.  
  78. Clipping format:
  79. The clipping format is very simple: The first 2 bytes in the
  80. buffer are the width and highth respectively (yes bytes,
  81. the width can only be up to 256 pixels wide). The rest is
  82. a very primitive run length of bytes representing the pixels,
  83. example:
  84.  
  85. byte 1 | byte 2 | byte 3 | byte 4 | and so on...
  86.  
  87. byte 1 is the width of the clipping
  88. byte 2 is the highth of the clipping
  89. byte 3 is the first byte of the clipping
  90. byte 4 is the second byte of the clipping
  91.  
  92. say you had a 2 x 2 clipping: (wow!)
  93.  
  94. 2 | 2 | 8 | 5 | 5 | 7 |
  95.  
  96. the display would look like this:
  97.  
  98. 85   line 1     (#'s representing colors)
  99. 57   line 2
  100.  
  101. Got it? Good. Its pretty simple.
  102.  
  103.  
  104.  
  105. If you have any questions or comments feel free to call me at
  106. 867-2957 or 867-3180 or write me:
  107.  
  108.  
  109. Matthew Bradley
  110. 41 Oakridge rd.
  111. Winder, Ga. 30680
  112.  
  113. Wait a minute, please write me or call or at least leave a
  114. message to me on my favorite BBS, the Atlanta Index, at 1-404-924-3472
  115. I want no $, just to know someone downloaded this file will
  116. be good enough for me. PLEASE!!